﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="AlunoInserir.aspx.cs" Inherits="InserirAluno" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
<script type="text/javascript" src="Scripts/jquery-1.7.1.js"></script>  
<script type="text/javascript" src="Scripts/jquery.maskedinput-1.3.js"></script>  
<script type="text/javascript" src="Scripts/Mascaras.js"></script>
    <div>
        <h2>
            Cadastro de Alunos</h2>
    </div><br />Nome:
    <asp:TextBox ID="TextNome" runat="server" Width="310px" ReadOnly="True"></asp:TextBox>
&nbsp; Matrícula:
    <asp:TextBox ID="TextMatricula" runat="server" Width="148px" 
    ReadOnly="True"></asp:TextBox>
    &nbsp;<asp:Label ID="lblID" runat="server" Visible="False"></asp:Label>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:LinkButton ID="lnkAlterar" runat="server" onclick="lnkAlterar_Click">Alterar Dados do Aluno</asp:LinkButton>
    <br />
    Data de nascimento:
    <asp:TextBox ID="TextData" runat="server" ReadOnly="True" CssClass="mask-data"></asp:TextBox>
&nbsp;<br />
    Sexo:<asp:RadioButtonList ID="RadioSexo" runat="server" 
        RepeatDirection="Horizontal" Enabled="False">
        <asp:ListItem Selected="True">M</asp:ListItem>
        <asp:ListItem>F</asp:ListItem>
    </asp:RadioButtonList>
    <br />
    Endereço:
    <asp:TextBox ID="TextEndereco" runat="server" Width="515px" ReadOnly="True"></asp:TextBox>
    <br />
    Cidade:
    <asp:TextBox ID="TextCidade" runat="server" ReadOnly="True"></asp:TextBox>
&nbsp;Estado:
    <asp:TextBox ID="TextEstado" runat="server" ReadOnly="True"></asp:TextBox>
&nbsp;Nacionalidade:
    <asp:TextBox ID="TextNacionalidade" runat="server" ReadOnly="True"></asp:TextBox>
    <br />
    Filiação Mãe:
    <asp:TextBox ID="TextMae" runat="server" Width="278px" ReadOnly="True"></asp:TextBox>
    <br />
    Filiação Pai:
    <asp:TextBox ID="TextPai" runat="server" Width="286px" ReadOnly="True"></asp:TextBox>
    <br />
    <hr />
    <div style="font-size: small; font-weight: 700">
        <p>
            Matricular Aluno
        </p>
    </div>
    Turma:<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        DataSourceID="ObjectDataSource1" Enabled="False">
        <Columns>
            <asp:BoundField DataField="id" HeaderText="id" SortExpression="id" />
            <asp:BoundField DataField="Serie" HeaderText="Serie" SortExpression="Serie" />
            <asp:BoundField DataField="Nome" HeaderText="Nome" SortExpression="Nome" />
            <asp:BoundField DataField="Ano" HeaderText="Ano" SortExpression="Ano" />
            <asp:BoundField DataField="Turno" HeaderText="Turno" SortExpression="Turno" />
            <asp:TemplateField>
                <ItemTemplate>
                    <asp:LinkButton ID="LinkButton1" runat="server" 
                        CommandArgument='<%# Eval("id") %>' 
                        oncommand="LinkButton1_Command">Matricular Aluno</asp:LinkButton>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
&nbsp;<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
        SelectMethod="list" TypeName="Negocio.TurmaNegocio">
        <SelectParameters>
            <asp:Parameter Name="ano" Type="Int32" />
            <asp:Parameter Name="serie" Type="String" />
            <asp:Parameter Name="turno" Type="String" />
        </SelectParameters>
    </asp:ObjectDataSource>
    <br />
    <br />
    <asp:Button ID="ButtonSalvar" runat="server" Text="Salvar" 
        onclick="Button1_Click" Visible="False" />
&nbsp;<asp:Button ID="ButtonCancelar" runat="server" Text="Cancelar" 
    onclick="ButtonCancelar_Click" />
</asp:Content>

